Skip to content

OSASINFRA-3133 - OpenStack support#195

Merged
openshift-merge-robot merged 4 commits intoopenshift:mainfrom
shiftstack:openstack
Jul 3, 2023
Merged

OSASINFRA-3133 - OpenStack support#195
openshift-merge-robot merged 4 commits intoopenshift:mainfrom
shiftstack:openstack

Conversation

@EmilienM
Copy link
Copy Markdown
Member

@EmilienM EmilienM commented Apr 14, 2023

OpenStack support in CPMS.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 14, 2023
@EmilienM EmilienM force-pushed the openstack branch 9 times, most recently from 2add629 to 3c9d625 Compare April 18, 2023 14:55
@EmilienM EmilienM force-pushed the openstack branch 7 times, most recently from 41d0792 to ca2234e Compare April 19, 2023 18:49
@EmilienM EmilienM marked this pull request as ready for review April 19, 2023 19:11
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 19, 2023
@openshift-ci openshift-ci bot requested review from elmiko and odvarkadaniel April 19, 2023 19:12
Copy link
Copy Markdown
Contributor

@odvarkadaniel odvarkadaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, the code LGTM. I would appreciate that someone else would look at this after KubeCon.

cc/ @JoelSpeed @damdo

@EmilienM
Copy link
Copy Markdown
Member Author

/test unit

@EmilienM
Copy link
Copy Markdown
Member Author

/test e2e-azure-operator e2e-aws-ovn-serial e2e-aws-ovn


// buildAWSFailureDomains builds an AWS flavored FailureDomains for the ControlPlaneMachineSet.
func buildAWSFailureDomains(failureDomains *failuredomain.Set) machinev1.FailureDomains {
func buildAWSFailureDomains(failureDomains *failuredomain.Set) (machinev1.FailureDomains, error) { //nolint:unparam
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reviewers: in a comment with Damiano, we want consistent buildFD functions for the providers, so since OpenStack can return an actual error, we let all builders to return an error too (even if the error is nil for now).

@EmilienM
Copy link
Copy Markdown
Member Author

/test unit

@EmilienM
Copy link
Copy Markdown
Member Author

EmilienM commented Jun 28, 2023

I've just spotted an issue when testing this again, but I'm not sure if it's only in my environment or what:

  Template:
    Machine Type:  machines_v1beta1_machine_openshift_io
    machines_v1beta1_machine_openshift_io:
      Failure Domains:
        Openstack:
          Availability Zone:  az0
          Availability Zone:  az1
          Availability Zone:  az2
        Platform:             OpenStack
      Metadata:
        Labels:
          machine.openshift.io/cluster-api-cluster:       refarch-b4dr4
          machine.openshift.io/cluster-api-machine-role:  master
          machine.openshift.io/cluster-api-machine-type:  master
      Spec:
        Lifecycle Hooks:
        Metadata:
        Provider Spec:
          Value:
            API Version:        machine.openshift.io/v1alpha1
            Availability Zone:  az2
            Cloud Name:         openstack
            Clouds Secret:
              Name:       openstack-cloud-credentials
              Namespace:  openshift-machine-api
            Flavor:       m1.xlarge
            Image:        rhcos-4.14
            Kind:         OpenstackProviderSpec
            Metadata:
              Creation Timestamp:  <nil>
            Networks:
              Filter:
              Subnets:
                Filter:
                  Name:  refarch-b4dr4-nodes
                  Tags:  openshiftClusterID=refarch-b4dr4
            Security Groups:
              Filter:
              Name:             refarch-b4dr4-master
            Server Group Name:  refarch-b4dr4-master
            Server Metadata:
              Name:                  refarch-b4dr4-master
              Openshift Cluster ID:  refarch-b4dr4
            Tags:
              openshiftClusterID=refarch-b4dr4
            Trunk:  true
            User Data Secret:
              Name:  master-user-data

The Provider Spec shouldn't have the Availability Zone field; as it's part of the Failure Domains.

@pierreprinetti
Copy link
Copy Markdown
Member

The Provider Spec shouldn't have the Availability Zone field; as it's part of the Failure Domains.

I am interested what you think should be in the providerSpec’s availabilityZone. The empty string?

@EmilienM
Copy link
Copy Markdown
Member Author

The Provider Spec shouldn't have the Availability Zone field; as it's part of the Failure Domains.

I am interested what you think should be in the providerSpec’s availabilityZone. The empty string?

I might clarify what I said but I'm talking about the providerSpec in the CPMS:

oc describe controlplanemachineset.machine.openshift.io cluster --namespace openshift-machine-api
Name:         cluster
Namespace:    openshift-machine-api
Labels:       machine.openshift.io/cluster-api-cluster=refarch-vgnhs
Annotations:  <none>
API Version:  machine.openshift.io/v1
Kind:         ControlPlaneMachineSet
Metadata:
  Creation Timestamp:  2023-06-28T20:17:38Z
  Finalizers:
    controlplanemachineset.machine.openshift.io
  Generation:  1
  Managed Fields:
    API Version:  machine.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .:
          f:machine.openshift.io/cluster-api-cluster:
      f:spec:
        .:
        f:replicas:
        f:selector:
        f:state:
        f:strategy:
          .:
          f:type:
        f:template:
          .:
          f:machineType:
          f:machines_v1beta1_machine_openshift_io:
            .:
            f:failureDomains:
              .:
              f:openstack:
              f:platform:
            f:metadata:
              .:
              f:labels:
                .:
                f:machine.openshift.io/cluster-api-cluster:
                f:machine.openshift.io/cluster-api-machine-role:
                f:machine.openshift.io/cluster-api-machine-type:
            f:spec:
              .:
              f:lifecycleHooks:
              f:metadata:
              f:providerSpec:
                .:
                f:value:
                  .:
                  f:apiVersion:
                  f:availabilityZone:
                  f:cloudName:
                  f:cloudsSecret:
                    .:
                    f:name:
                    f:namespace:
                  f:flavor:
                  f:image:
                  f:kind:
                  f:metadata:
                    .:
                    f:creationTimestamp:
                  f:networks:
                  f:securityGroups:
                  f:serverGroupName:
                  f:serverMetadata:
                    .:
                    f:Name:
                    f:openshiftClusterID:
                  f:tags:
                  f:trunk:
                  f:userDataSecret:
                    .:
                    f:name:
    Manager:      cluster-bootstrap
    Operation:    Update
    Time:         2023-06-28T20:17:38Z
    API Version:  machine.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
    Manager:      cluster-bootstrap
    Operation:    Update
    Subresource:  status
    Time:         2023-06-28T20:17:38Z
    API Version:  machine.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .:
          v:"controlplanemachineset.machine.openshift.io":
    Manager:      Go-http-client
    Operation:    Update
    Time:         2023-06-28T20:25:02Z
    API Version:  machine.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:conditions:
          .:
          k:{"type":"Available"}:
            .:
            f:lastTransitionTime:
            f:message:
            f:observedGeneration:
            f:reason:
            f:status:
            f:type:
          k:{"type":"Degraded"}:
            .:
            f:lastTransitionTime:
            f:message:
            f:observedGeneration:
            f:reason:
            f:status:
            f:type:
          k:{"type":"Error"}:
            .:
            f:lastTransitionTime:
            f:message:
            f:observedGeneration:
            f:reason:
            f:status:
            f:type:
          k:{"type":"Progressing"}:
            .:
            f:lastTransitionTime:
            f:message:
            f:observedGeneration:
            f:reason:
            f:status:
            f:type:
        f:observedGeneration:
        f:readyReplicas:
        f:replicas:
        f:updatedReplicas:
    Manager:         Go-http-client
    Operation:       Update
    Subresource:     status
    Time:            2023-06-28T20:28:53Z
  Resource Version:  17954
  UID:               00f6f58f-22b3-47c6-80c7-948c6b0fe369
Spec:
  Replicas:  3
  Selector:
    Match Labels:
      machine.openshift.io/cluster-api-cluster:       refarch-vgnhs
      machine.openshift.io/cluster-api-machine-role:  master
      machine.openshift.io/cluster-api-machine-type:  master
  State:                                              Active
  Strategy:
    Type:  RollingUpdate
  Template:
    Machine Type:  machines_v1beta1_machine_openshift_io
    machines_v1beta1_machine_openshift_io:
      Failure Domains:
        Openstack:
          Availability Zone:  az0
          Availability Zone:  az1
          Availability Zone:  az2
        Platform:             OpenStack
      Metadata:
        Labels:
          machine.openshift.io/cluster-api-cluster:       refarch-vgnhs
          machine.openshift.io/cluster-api-machine-role:  master
          machine.openshift.io/cluster-api-machine-type:  master
      Spec:
        Lifecycle Hooks:
        Metadata:
        Provider Spec:
          Value:
            API Version:        machine.openshift.io/v1alpha1
            Availability Zone:  az2
            Cloud Name:         openstack
            Clouds Secret:
              Name:       openstack-cloud-credentials
              Namespace:  openshift-machine-api
            Flavor:       m1.xlarge
            Image:        refarch-vgnhs-rhcos
            Kind:         OpenstackProviderSpec
            Metadata:
              Creation Timestamp:  <nil>
            Networks:
              Filter:
              Subnets:
                Filter:
                  Name:  refarch-vgnhs-nodes
                  Tags:  openshiftClusterID=refarch-vgnhs
            Security Groups:
              Filter:
              Name:             refarch-vgnhs-master
            Server Group Name:  refarch-vgnhs-master
            Server Metadata:
              Name:                  refarch-vgnhs-master
              Openshift Cluster ID:  refarch-vgnhs
            Tags:
              openshiftClusterID=refarch-vgnhs
            Trunk:  true
            User Data Secret:
              Name:  master-user-data

It should not be there, AFIK.
At least it wasn't there a few weeks ago when I did the first demo of this thing working.

@JoelSpeed
Copy link
Copy Markdown
Contributor

The Provider Spec shouldn't have the Availability Zone field; as it's part of the Failure Domains.

I am interested what you think should be in the providerSpec’s availabilityZone. The empty string?

Within the CPMS providerSpec, anything that's meant to be set by the failure domain, should be cleared, so yes, empty string

@EmilienM
Copy link
Copy Markdown
Member Author

/test e2e-openstack-operator

@EmilienM
Copy link
Copy Markdown
Member Author

@pierreprinetti much better with the new installer patchset:

Spec:
  Replicas:  3
  Selector:
    Match Labels:
      machine.openshift.io/cluster-api-cluster:       refarch-s26qd
      machine.openshift.io/cluster-api-machine-role:  master
      machine.openshift.io/cluster-api-machine-type:  master
  State:                                              Active
  Strategy:
    Type:  RollingUpdate
  Template:
    Machine Type:  machines_v1beta1_machine_openshift_io
    machines_v1beta1_machine_openshift_io:
      Failure Domains:
        Openstack:
          Availability Zone:  az0
          Availability Zone:  az1
          Availability Zone:  az2
        Platform:             OpenStack
      Metadata:
        Labels:
          machine.openshift.io/cluster-api-cluster:       refarch-s26qd
          machine.openshift.io/cluster-api-machine-role:  master
          machine.openshift.io/cluster-api-machine-type:  master
      Spec:
        Lifecycle Hooks:
        Metadata:
        Provider Spec:
          Value:
            API Version:  machine.openshift.io/v1alpha1
            Cloud Name:   openstack
            Clouds Secret:
              Name:       openstack-cloud-credentials
              Namespace:  openshift-machine-api
            Flavor:       m1.xlarge
            Image:        refarch-s26qd-rhcos
            Kind:         OpenstackProviderSpec
            Metadata:
              Creation Timestamp:  <nil>
            Networks:
              Filter:
              Subnets:
                Filter:
                  Name:  refarch-s26qd-nodes
                  Tags:  openshiftClusterID=refarch-s26qd
            Security Groups:
              Filter:
              Name:             refarch-s26qd-master
            Server Group Name:  refarch-s26qd-master
            Server Metadata:
              Name:                  refarch-s26qd-master
              Openshift Cluster ID:  refarch-s26qd
            Tags:
              openshiftClusterID=refarch-s26qd
            Trunk:  true
            User Data Secret:
              Name:  master-user-data

@damdo @JoelSpeed ready for review when you have time.
Let me know if you want me to squash the commits.

Nothing changed much since your last reviews, except the last 2 commits I would say, which are small enough to be quickly reviewed.

EmilienM and others added 2 commits June 30, 2023 14:50
Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Co-Authored-By: Pierre Prinetti <pierreprinetti@redhat.com>
If `OPENSTACK_CONTROLPLANE_FLAVOR_ALTERNATE` is found in the environment
variables, we'll use that flavor when running the control plane
verticale scale tests. Otherwise, roll back on the tags.
```yaml
- availabilityZone: "<nova availability zone>"
rootVolume:
availabilityZone: "<cinder availability zone>"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we add another field to the AZ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're talking about the volume type, it'll be handled separately via #217


#### Configuring a control plane machine set on OpenStack

Two fields are supported for now: `availabilityZone` (instance AZ) and `rootVolume.availabilityZone` (root volume AZ).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need updating for the third field that we added?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

volume type will be handled separately via #217

@JoelSpeed
Copy link
Copy Markdown
Contributor

Apart from the nit about the errors, I think this is good to go, thanks for working with us on this 😄

@JoelSpeed
Copy link
Copy Markdown
Contributor

/approve

Copy link
Copy Markdown
Member

@pierreprinetti pierreprinetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code seems to be behaving conform to the spec. I believe that there is no reason to further defer testing in vivo.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Jul 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, pierreprinetti

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pierreprinetti
Copy link
Copy Markdown
Member

/lgtm

@pierreprinetti
Copy link
Copy Markdown
Member

/retest-required

Copy link
Copy Markdown
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for all you efforts!

@openshift-ci-robot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 88ec3eb and 2 for PR HEAD 464c8dc in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Jul 3, 2023

@EmilienM: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-ovn-etcd-scaling 464c8dc link false /test e2e-azure-ovn-etcd-scaling

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@pierreprinetti
Copy link
Copy Markdown
Member

/retest-required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants